<script setup lang="ts">
const show = ref(true);
const toadMsg = useState<string>("toadMsg");

const t = setTimeout(() => {
  show.value = false;
  toadMsg.value = "";
  clearTimeout(t);
}, 3000);
</script>

<template>
  <Mask transparent="none" z="z-[100]" v-if="show">
    <div
      class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-black/90 p-6 rounded text-white"
    >
      <slot>提示信息</slot>
    </div>
  </Mask>
</template>
